﻿using KeyStone.Ioc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IocContainerExample.TestHarness
{
   public class Example1
   {
      public Example1()
      {
         IIocContainer container = new IocContainer();
         container.Register<IMyExample1, MyExample1>();

         IMyExample1 temp = container.Resolve<IMyExample1>();

         Console.WriteLine("Example 1 : {0}" ,temp.Text);

      }

   }
   
   public interface IMyExample1
   {
      string Text { get; set; }
   }

   public class MyExample1 : IMyExample1
   {
      public MyExample1()
      {
         Text = "hello";
      }

      public string Text { get; set; }
   }
}
